package xyz.weizhi.service.Imp;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;
import xyz.weizhi.dao.bookDao;
import xyz.weizhi.domain.book;
import xyz.weizhi.service.bookService;

import java.util.List;

/**
 * @Author milian
 * @Date 2021/9/15 0015 9:55
 */
@Service
public class bookServiceImp implements bookService {
    @Autowired
    private bookDao bookDao;
    public List<book> selectAllBook() {
        return bookDao.selectAllBook();
    }

    public List<book> selectBookByName(String name) {
        return bookDao.selectBookByName(name);
    }

    public Boolean addBook(book book) {
         bookDao.addBook(book);
        return true;
    }

    public Boolean updateBookById(Integer id) {
        bookDao.updateBookById(id);
        return true;
    }

    public Boolean deleteBookById(Integer id) {
        bookDao.deleteBookById(id);
        return true;
    }
}
